/**
 *====================================================
 * 文件名称: FinanceSignatureActionApi.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2016年10月31日 下午2:02:38  			2016年10月31日 下午2:02:38  (创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.action.v1;

import com.yuexunit.finance.context.FinVersion1;
import com.yuexunit.finance.project.action.v1.model.output.SealsDetail;
import com.yuexunit.finance.project.action.v1.model.output.SignFileSeals;
import com.yuexunit.finance.project.action.v1.model.output.SignPdfPicDetail;
import com.yuexunit.finance.project.action.v1.model.output.SignatureAuditRecordDetail;
import com.yuexunit.finance.project.action.v1.model.output.SignatureDetail;
import com.yuexunit.finance.project.action.v1.model.output.SignatureInfo;
import com.yuexunit.web.annotation.Action;
import com.yuexunit.web.annotation.Parameter;
import com.yuexunit.web.annotation.Permission;

/** 
 * @ClassName: FinanceSignatureActionApi 
 * @Description: TODO 指尖金融电子签章管理
 * @author: NTBK-021-1010
 * @date: 2016年10月31日 下午2:02:38  	
 */
public interface FinanceSignatureActionApi {
	
	@Action(version =FinVersion1.class, description="注销账户")
	public void deleteAccount(
			@Parameter(name="accountId", description = "账户ID") String accountId
	);
	
	@Permission
	@Action(version =FinVersion1.class, description="查询签章")
	public SignatureDetail inquireSealDetail(
			@Parameter(name="enterpriseId", description = "企业ID", nullable = true) Long enterpriseId,
			@Parameter(name="modelType", description = "模板类型: 1:模板印章/2:图片印章", nullable = true) Integer modelType,
			@Parameter(name="sealType", description = "签章类型 1:法人人/2:企业/3:财务/4:其他") Integer sealType
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class, description="查询签章")
	public SealsDetail sealGetSeals(
			@Parameter(name="enterpriseId", description = "企业ID", nullable = true) Long enterpriseId
	);
	
	@Permission
	@Action(version =FinVersion1.class, description="审批签章")
	public void auditSeal(
			@Parameter(name="id", description = "签章ID") Long id,
			@Parameter(name="auditState", description = "审核状态") Boolean auditState,
			@Parameter(name="remark", description = "审批信息") String remark
	);
	
	@Action(version =FinVersion1.class, description="ceshi")
	public void testSign() throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class, description="连接e签宝生成证书,返回账户唯一标识")
	public void addOrganize() throws Exception;
	
//	@Permission
//	@Action(version =FinVersion1.class, description="更新e签宝联系人信息")
//	public void updateOrganize() throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class, description="创建企业模板印章")
	public void createTemplateSeal(
			@Parameter(name="enterpriseId", description = "企业ID") Long enterpriseId
	)throws Exception ;
	
	@Permission
	@Action(version =FinVersion1.class,description="创建法人模板印章")
	public void createTemplateSealPersonal(
			@Parameter(name="enterpriseId", description = "企业ID") Long enterpriseId
	)throws Exception ;
	
	@Permission
	@Action(version =FinVersion1.class, description="创建模板印章")
	public void createEnterpriseTemplateSeal(
			@Parameter(name="enterpriseId", description = "企业ID", nullable = true) Long enterpriseId,
			@Parameter(name="hText", description = "横向文", nullable = true) String hText,
			@Parameter(name="qText", description = "下弦文", nullable = true) String qText,
			@Parameter(name="sealType", description = "印章类型 1:法人/2:企业/3:财务/4:其他") Integer sealType,
			@Parameter(name="remark", description = "备注", nullable = true) String remark,
			@Parameter(name="modelType", description = "模板类型 : 1:模板印章/2:图片印章", nullable = true) Integer modelType
	)throws Exception ;
	
	@Permission
	@Action(version =FinVersion1.class, description="预览模板印章")
	@Parameter(name = "sealData", description = "印章数据")
	public String previewEnterpriseTemplateSeal(
			@Parameter(name="hText", description = "横向文", nullable = true) String hText,
			@Parameter(name="qText", description = "下弦文", nullable = true) String qText,
			@Parameter(name="enterpriseId", description = "企业ID", nullable = true) Long enterpriseId,
			@Parameter(name="sealType", description = "印章类型 1:法人/2:企业/3:财务/4:其他") Integer sealType,
			@Parameter(name="remark", description = "备注", nullable = true) String remark
	)throws Exception ;
	
	@Permission
	@Action(version = FinVersion1.class, description = "用户印章打回")
	public void callBackSignature(
			@Parameter(name="enterpriseId", description = "企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "sealType", description = "印章类型") Integer sealType,
			@Parameter(name = "remark", description = "备注") String remark
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "用户查询印章审核信息")
	public SignatureAuditRecordDetail inquirySignatureCallbackRecord(
			@Parameter(name="enterpriseId", description = "企业ID", nullable = true) Long enterpriseId,
			@Parameter(name = "sealType", description = "印章类型") Integer sealType,
			@Parameter(name = "recordType", description = "审核信息类型：1：打回信息/2：拒绝信息/3：审核同意", nullable = true) Integer recordType
	);
	
	@Permission
	@Action(version =FinVersion1.class, description="创建法人模板印章")
	public void createLegalPersonTemplateSeal(
			@Parameter(name="enterpriseId", description = "企业ID", nullable = true) Long enterpriseId,
			@Parameter(name="remark", description = "备注", nullable = true) String remark
	)throws Exception ;
	
	//@Permission
//	@Action(version =FinVersion1.class, description="用户发起摘要签署")
//	public void createDocumentSummarySign(
//			@Parameter(name="enterpriseId", description = "企业Id") Long enterpriseId,
//			@Parameter(name="srcFile", description = "原文件") String srcFile,
//			@Parameter(name="dstFile", description = "签署后文件含路径") String dstFile,
//			@Parameter(name="key", description = "关键字签章") String key) throws Exception;
	
//	@Permission
//	@Action(version =FinVersion1.class, description="用户发起摘要签署")
//	public void createEnterpriseDocumentSummarySign(
//			@Parameter(name="enterpriseId", description = "企业Id", nullable = true) Long enterpriseId,
//			@Parameter(name="filesInfoId", description = "融资附件ID") Long filesInfoId,
//			@Parameter(name="fileUuid", description = "文件UUID") String fileUuid,
//			@Parameter(name="sealType", description = "签章类型 1-法人 2-企业") Integer sealType,
//			@Parameter(name="mobile", description = "接收短信验证码的手机") String mobile,
//			@Parameter(name="code", description = "验证码") String code,
//			@Parameter(name="key", description = "关键字签章") String key) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class, description="用户发起批量摘要签署")
	public void createEnterpriseDocumentSummarySignAll(
			@Parameter(name="enterpriseId", description = "企业Id", nullable = true) Long enterpriseId,
			@Parameter(name="filesInfoId", description = "融资附件ID") Long[] filesInfoId,
			@Parameter(name="fileUuid", description = "文件UUID") String[] fileUuid,
			@Parameter(name="sealType", description = "签章类型 1:法人/2:企业/3:财务/4:其他", nullable = true) Integer sealType,
			@Parameter(name="mobile", description = "接收短信验证码的手机") String mobile,
			@Parameter(name="code", description = "验证码") String code
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class, description="平台发起批量摘要签署")
	public void createPlatformDocumentSummarySignAll(
			@Parameter(name="financeId", description = "融资ID") Long financeId,
			@Parameter(name="filesInfoId", description = "融资附件ID") Long[] filesInfoId,
			@Parameter(name="fileUuid", description = "文件UUID") String[] fileUuid,
			@Parameter(name="sealType", description = "签章类型 1:法人/2:企业/3:财务", nullable = true) Integer sealType
	) throws Exception;
	
	@Permission
	@Action(version =FinVersion1.class, description="平台发起批量摘要签署")
	public void createWarehousePickupPlatformDocumentSummarySignAll(
			@Parameter(name="pickupId", description = "提货ID") Long pickupId,
			@Parameter(name="filesInfoId", description = "融资附件ID") Long[] filesInfoId,
			@Parameter(name="fileUuid", description = "文件UUID") String[] fileUuid,
			@Parameter(name="sealType", description = "签章类型 1:法人/2:企业/3:财务", nullable = true) Integer sealType
	) throws Exception;
	
	//用户发起摘要签署--文件流
//	public FileDigestSignResult createDocumentSummarySignStream(
//			@Parameter(name="enterpriseId", description = "企业Id")Long enterpriseId,
//			@Parameter(name="stream", description = "待签署pdf文档流")byte[] stream,
//			@Parameter(name="fileName", description = "记录文件名")String fileName,
//			@Parameter(name="key", description = "关键字签章")String key);
	
//	@Permission
//	@Action(version =FinVersion1.class, description="平台发起摘要签署")
//	public void createSeflDocumentSummarySign(
//			@Parameter(name="srcFile", description = "原文件") String srcFile,
//			@Parameter(name="dstFile", description = "签署后文件含路径") String dstFile,
//			@Parameter(name="key", description = "关键字签章") String key) throws Exception;
	
	//@Permission
	//@Action(version =FinVersion1.class,description="平台发起摘要签署 --文件流")
//	public  FileDigestSignResult createSeflDocumentSummarySignStream(
//			@Parameter(name="stream", description = "待签署pdf文档流") byte[] stream,
//			@Parameter(name="fileName", description = "平台记录文件名") String fileName,
//			@Parameter(name="key", description = "关键字签章") String key);
	
//	@Permission
//	@Action(version =FinVersion1.class, description="平台发起摘要签署")
//	public void createPlatformDocumentSummarySign(
//			@Parameter(name="filesInfoId", description = "融资附件ID") Long filesInfoId,
//			@Parameter(name="fileUuid", description = "文件UUID") String fileUuid,
//			@Parameter(name="key", description = "关键字签章") String key
//	) throws Exception;
	
	//@Permission
//	@Action(version =FinVersion1.class,description="文档保全接口")
//	public void saveSignedFile(@Parameter(name="enterpriseId", description = "企业Id") Long enterpriseId,
//			@Parameter(name="docFilePath", description = "签署后的文档路径") String docFilePath,
//			@Parameter(name="docName", description = "文档名称") String docName)throws Exception;
	
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询签署合同数据")
	public SignatureInfo inquireFinanceContractInfo (
			@Parameter(name = "fileUuid", description = "文件Uuid") String fileUuid
	) throws Exception;
	
	@Permission
	@Action(version = FinVersion1.class, description = "指定手机发送签署短信验证码")
	public void sendSignCode3rd (
			@Parameter(name = "mobile", description = "文件Uuid") String mobile
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "保存文件签章位置")
	public void saveSealPos(
			@Parameter(name = "signFileSealId", description = "签署文件印章信息ID", nullable = true) Long[] signFileSealId,
			@Parameter(name = "fileUuid", description = "文件Uuid") String[] fileUuid,
			@Parameter(name = "key", description = "关键字签章", nullable = true) String[] key,
			@Parameter(name = "sealType", description = "签章类型  0:未知/1:法人/2:企业/3:财务/4:其他") Integer[] sealType,
			@Parameter(name = "posType", description = "定位类型 0-坐标定位，1-关键字定位，默认0") Integer[] posType,
			@Parameter(name = "posPage", description = "签署页码，若为多页签章，支持页码格式“1-3,5,8“，若为坐标定位时，不可空") String[] posPage,
			@Parameter(name = "page", description = "页码") Integer[] page,
			@Parameter(name = "posX", description = "签署位置X坐标，若为关键字定位，相对于关键字的X坐标偏移量，默认0") Float[] posX,
			@Parameter(name = "posY", description = "签署位置Y坐标，若为关键字定位，相对于关键字的Y坐标偏移量，默认0") Float[] posY,
			@Parameter(name = "signType", description = "签章类型 0-单页 1-多页 2-骑缝 3-关键字") Integer[] signType,
			@Parameter(name = "flagX", description = "flagX") Float[] flagX,
			@Parameter(name = "flagY", description = "flagY") Float[] flagY,
			@Parameter(name = "width", description = "width") Float[] width,
			@Parameter(name = "height", description = "height") Float[] height,
			@Parameter(name = "marginLeft", description = "marginLeft") Float[] marginLeft,
			@Parameter(name = "marginTop", description = "marginTop") Float[] marginTop
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "查询文件待签章位置")
	public SignFileSeals inquireWaitSignPos(
			@Parameter(name = "fileUuid", description = "文件Uuid") String fileUuid,
			@Parameter(name = "enterpriseId", description = "企业ID", nullable = true) Long enterpriseId
	) throws Exception;
	
	@Permission
	@Action(version = FinVersion1.class, description = "取消文件签章位置")
	public void cancelSealPos(
			@Parameter(name = "signFileSealId", description = "签署文件印章信息ID") Long signFileSealId
	);
	
	@Action(version = FinVersion1.class, description = "PDF文件转图片")
	public SignPdfPicDetail getDocPic(
			@Parameter(name = "fileUuid", description = "文件UUID") String fileUuid
	);
	
	@Permission
	@Action(version = FinVersion1.class, description = "图片印章提交")
	public void sealPictureSubmit(
			@Parameter(name = "fileUuid", description = "图片UUID") String fileUuid,
			@Parameter(name = "sealType", description = "印章类型") Integer sealType
	) throws Exception;
	
}
